<template>
	<view :class="[$store.state.AppStyle,isDark ? 'dark' : ' ']" v-if="tabCurTab==isLoging" :style="{'background-color':isDark?'#1c1c1c':'#f6f6f6','min-height':isDark?'100vh':'auto'}">
		<view class="header" :style="[{height:CustomBar + 'px'}]" v-if="tabCurTab==isLoging">
			<view class="cu-bar bg-white" :style="{'height': CustomBar + 'px','padding-top':StatusBar + 'px'}">
				<!--  #ifdef MP -->
				<view class="action" @tap="toSearch">
					<text class="cuIcon-search"></text>
				</view>
				<view class="content text-bold" :style="[{top:StatusBar + 'px'}]">
					{{$t('tabpage.home.homepage')}}
				</view>
				<!--  #endif -->
				<!--  #ifdef H5 || APP -->
				<view class="search-form home-search" @tap="toSearch">
					<text class="cuIcon-search"></text>
					<view class="search-form-text">{{$t('tabpage.home.searchit')}}</view>
				</view>
				<!--  #endif -->
			</view>
		</view>
		<view :style="[{padding:CustomBar + 'px 10px 0px 10px'}]"></view>
		
		<view class="data-box bg-white" :style="swiperStyle ? '' : 'margin: 0 30rpx;'" v-if="lunbo_of==1&&tabCurTab==isLoging&&homeMode!=3&&swiperList&&swiperList.length>0&&isComponentReady">
				<tn-swiper :list="swiperList" :class="swiperStyle?'':'uni-swiper-slides-1'"
					style="margin: 0;padding: 0;border-radius: 20upx;" :effect3d="swiperStyle" @click="swiperclick"
					:title="true" :height="swiperHeight"
					:effect3dPreviousSpacing="80"></tn-swiper>
			</view>
			
			<view class="data-box bg-white" :class="{
			'data-box-2-banner-1': !swiperStyle&&homeStyle==2,
			'data-box-2-banner-3': swiperStyle&&homeStyle==2,
			'bg-h': homeStyle==2
			}" v-if="lunbo_of==1&&tabCurTab==isLoging&&homeMode==3&&swiperList&&swiperList.length>0&&isComponentReady">
			<!-- #ifdef APP || H5 -->
				<swiper class="custom-swiper" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="500"
					:circular="true" :radius="true" indicator-active-color="#ffffff" @change="swiperChange">
					<swiper-item v-for="(item, index) in swiperList" :key="index" v-if="item" @click="swiperclick(index)">
						<view class="swiper-item">
							<view class="swiper-bg">
								<image class="bg-image" :src="item.url" mode="aspectFill"></image>
								<view class="dark-overlay"></view>
							</view>
							<view class="swiper-content">
								<view class="app-info">
									<image class="app-icon" :src="item.url" mode="aspectFill"></image>
									<view class="app-text">
										<text class="app-name" style="margin-top: 0rpx;">{{item.title}}</text>
										<view class="app-rating">
											<tn-rate v-model="item.scoreNum" :count="5" :allowHalf="true" :disabled="true"
												:size="28" activeColor="#57d1b1" inactiveColor="#cecece"
												activeIcon="star-fill" inactiveIcon="star" :gutter="10"></tn-rate>
										</view>
										<text class="app-desc">{{item.intro}}</text>
									</view>
								</view>
							</view>
						</view>
					</swiper-item>
				</swiper>
			<!-- #endif -->
		</view>
		<!-- 以上勿修改！以上勿修改！以上勿修改！以上勿修改！以上勿修改！以上勿修改！ -->
		
		<!-- 以上勿修改！以上勿修改！以上勿修改！以上勿修改！以上勿修改！以上勿修改！ -->

		<!-- 以上勿修改！以上勿修改！以上勿修改！以上勿修改！以上勿修改！以上勿修改！ -->
		
		<!-- 可装修部分 start-->

		<!--图标按钮栏 start-->
		<view class="bg-white" v-if="top_of==1&&tabCurTab==isLoging">
			<view class="icon-grid tn-margin-top-sm">
				<view class="icon-item tn-radius" v-for="(item, index) in iconimg"
					:key="index" @tap="toLink(item.link,item.lgof)" v-if="item">
					<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
						<view class="icon5__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur"
							:style="'background-image: url(' + item.url + ')'" style="background-size:100% 100%;">
						</view>
						<view class="tn-text-center text-bold">
							<text class="tn-text-ellipsis">{{item.name}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!--图标按钮栏 end-->

		<!--滚动通知 start-->
		<view class="tn-margin-bottom-sm bg-white" v-if="gonggao_of==1">
			<uni-notice-bar v-if="noticeList && noticeList.trim()" :key="noticeBarKey" single :text="noticeList" showIcon scrollable :fontSize="16" color='#000'
				:background-color="isDark ? '#1c1c1c' : '#fff'" :color="isDark ? '#c7cddb' : '#000'"></uni-notice-bar>
		</view>
		<!--滚动通知 end-->


		<!-- 纵向帖子卡片模块（两列布局） start-->
		<block v-if="tzof==1&&tabCurTab==isLoging">
		<view class="vertical-articles" v-if="tabCurTab==isLoging && postList_views && postList_views.length > 0 && isComponentReady">
			<!-- <view class="cu-bar bg-white">
				<view class="action data-box-title">
					热门推荐
				</view>
				<view class="action more" @tap="goAllSection">
					<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
				</view>
			</view> -->
			<view class="vertical-articles-grid">
				<view class="article-grid-item" v-for="(item, index) in postList_views.slice(0, 10)" :key="index" @tap="goInfo(item.id)">
					<postCardHorizontal :item="item" :showType="'views,likes'" :size="'large'" :showSection="true" :isDark="isDark"></postCardHorizontal>
				</view>
			</view>
		</view>
		</block>
		<!-- 纵向帖子卡片模块 end -->

		<!-- 置顶帖子模块 start-->
		<block v-if="tzof==1&&tabCurTab==isLoging">
		<view v-if="tabCurTab==isLoging && postList_top && postList_top.length > 0 && isComponentReady" class="horizontal-articles">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					{{$t('tabpage.home.topnotice')}}
				</view>
				<!-- <view class="action more" @tap="goAllSection">
					<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
				</view> -->
			</view>
			<scroll-view class="scroll-articles scroll-articles-padding" scroll-x="true" show-scrollbar="false" v-if="postList_top && postList_top.length > 0">
				<view class="scroll-articles-content">
					<view v-for="(item, index) in postList_top.slice(0, 6)" class="article-card-item" :key="index" @tap="goInfo(item.id)" v-if="item">
						<postCardHorizontal :item="item" :showType="'comments'" :size="'large'" :showSection="true" :isDark="isDark"></postCardHorizontal>
					</view>
				</view>
			</scroll-view>
		</view>
		</block>
		<!-- 置顶帖子模块 end -->

		<!-- 精选圈子 start-->
		<block v-if="tzof==1&&tabCurTab==isLoging">
			<view class="data-box tn-margin-top-sm"
				v-if="circleOf==1&&tabCurTab==isLoging">
				<view class="cu-bar bg-white">
					<view class="action data-box-title">
						{{$t('tabpage.home.circlerecom')}}
					</view>
					<view class="action more" @tap="goAllSection">
						<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
					</view>
				</view>
				<view class="home-recommend-container">
					<view class="home-recommend-item" v-for="(item, index) in recommendSectionList.slice(0, 4)" :key="index" @click="goSection(item.id)" v-if="item">
						<view class="home-recommend-item-content">
							<view class="home-recommend-avatar-container">
								<view class="home-recommend-avatar" :style="item.pic ? 'background-image:url('+ item.pic +')' : ''" v-if="item.pic">
								</view>
								<view class="home-recommend-avatar-placeholder" v-else>
									<text class="home-placeholder-text">{{item.name.charAt(0)}}</text>
								</view>
							</view>
							<view class="home-recommend-name">{{item.name}}</view>
							<view class="home-recommend-count">{{item.followNum + $t('tabpage.home.peoplejoin')}}</view>
						</view>
					</view>
				</view>
			</view>
		</block>
		<!-- 精选圈子 end-->
		<!-- 横向帖子模块（大尺寸，显示时间） start-->
		<block v-if="tzof==1&&tabCurTab==isLoging">
		<view v-if="tabCurTab==isLoging && postList_replyTime && postList_replyTime.length > 0 && isComponentReady" class="horizontal-articles">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					{{$t('tabpage.home.latestreply')}}
				</view>
				<view class="action more" @tap="goAllSection">
					<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
				</view>
			</view>
			<scroll-view class="scroll-articles scroll-articles-padding" scroll-x="true" show-scrollbar="false" v-if="postList_replyTime && postList_replyTime.length > 0">
				<view class="scroll-articles-content">
					<view v-for="(item, index) in postList_replyTime.slice(0, 6)" class="article-card-item" :key="index" @tap="goInfo(item.id)" v-if="item">
						<postCardHorizontal :item="item" :showType="'comments'" :size="'medium'" :showSection="true" :isDark="isDark"></postCardHorizontal>
					</view>
				</view>
			</scroll-view>
		</view>
		</block>
		<!-- 横向帖子模块（大尺寸，显示时间） end -->
		
		
		<!-- 帖子列表 start-->
			<block v-if="tzof==1&&tabCurTab==isLoging">
			<view class="tn-margin-top-sm" :class="{'bg-white': homeStyle==1}">
				<view class="cu-bar bg-white">
					<view class="action data-box-title">
						{{$t('tabpage.home.freshlybaked')}}
					</view>
					<view class="action more" @tap="goAllSection">
						<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
					</view>
				</view>
					<view class="forum-list-main">
						<view class="no-data" v-if="postList_created.length==0">
							<text class="cuIcon-text"></text>{{$t('common.nodata')}}
						</view>
						<block v-for="(item,index) in postList_created.slice(0, 6)" :key="index" v-if="item">
							<forumItem :item="item" :myPurview="0"></forumItem>
						</block>
					</view>
			</view>
		</block>
		<!-- 帖子列表 end-->

		<!-- 动态列表模块 start-->
			<block v-if="spaceof==1&&tabCurTab==isLoging">
			<view class="data-box tn-margin-top-sm" v-if="tabCurTab==isLoging && spaceList_created && spaceList_created.length > 0 && isComponentReady">
				<view class="cu-bar bg-white">
					<view class="action data-box-title">
						{{$t('tabpage.home.newtrend')}}
					</view>
				</view>
				<spaceItem :spaceList="spaceList_created.slice(0, 6)" :curIMG="curIMG" :isDark="isDark"></spaceItem>
			</view>
		</block>
		<!-- 动态列表模块 end-->

		<!-- 纵向文章卡片模块（两列布局） start-->
		<block v-if="wzof==1&&tabCurTab==isLoging">
		<view class="vertical-articles" v-if="tabCurTab==isLoging && contentsList_views && contentsList_views.length > 0 && isComponentReady">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					{{$t('tabpage.home.hotarticle')}}
				</view>
				<view class="action more" @tap="toTopContents($t('tabpage.home.allarticle'),'commentsNum')" hover-class="action-hover">
					<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
				</view>
			</view>
			<view class="vertical-articles-grid">
				<view class="article-grid-item" v-for="(item, index) in contentsList_views" :key="index" @tap="toInfo(item,'wz')" v-if="item">
					<articleCardHorizontal :item="item" :showType="'likes,comments'" :size="'large'" :isDark="isDark"></articleCardHorizontal>
				</view>
			</view>
		</view>
		</block>
		<!-- 纵向文章卡片模块 end -->

		<!-- 横向滑动文章模块 小尺寸 start-->
		<block v-if="wzof==1&&tabCurTab==isLoging">
		<view class="horizontal-articles" v-if="tabCurTab==isLoging && contentsList_likes && contentsList_likes.length > 0 && isComponentReady">
			<view class="cu-bar bg-white">
					<view class="action data-box-title">
						{{$t('tabpage.home.deeplyloved')}}
					</view>
					<view class="action more" @tap="toTopContents($t('tabpage.home.allarticle'),'commentsNum')" hover-class="action-hover">
						<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
					</view>
				</view>
			<scroll-view class="scroll-articles scroll-articles-padding" scroll-x="true" show-scrollbar="false">
				<view class="scroll-articles-content">
						<view v-for="(item, index) in contentsList_likes" class="article-card-item" :key="index" @tap="toInfo(item,'wz')" v-if="item">
						<articleCardHorizontal :item="item" :showType="'likes'" :size="'medium'" :isDark="isDark"></articleCardHorizontal>
					</view>
				</view>
			</scroll-view>
		</view>
		</block>
		<!-- 横向滑动文章模块 end -->

		<!-- 精选应用 start-->
		<block v-if="tabCurTab==isLoging&&sy_appbox">
			<!-- #ifdef APP || H5 -->
			<view class="bg-white" v-if="tabCurTab==isLoging&&appTopOf==1">
				<view style="display: flex;justify-content: space-between;">
					<view style="padding: 20rpx 30rpx;font-weight: bold;font-size: 36upx;">
						{{$t('tabpage.home.mysift')}}
					</view>
				</view>
				<tn-scroll-list :indicator="false">
					<view class="tn-flex">
						<appItemHorizontal 
							v-for="(item, index) in appiconimg" 
							:key="index" 
							:item="item"
							@tap="toAppInfo"
							:showDownloadBtn="true"
							:isDark="isDark"
							v-if="item"
						></appItemHorizontal>
					</view>
				</tn-scroll-list>
			</view>
			<!-- #endif -->
		</block>
		<!-- 精选应用 end-->
		<!-- 应用列表模块 start-->
		<block v-if="tabCurTab==isLoging&&sy_appbox">
			<!-- #ifdef APP || H5 -->
			<view class="bg-white margin-top-sm" v-if="tabCurTab==isLoging">
				<view class="cu-bar" style="min-height: 100upx;">
					<view class="action data-box-title">
						{{$t('global.ravereview')}}
					</view>
					<view class="action more" @tap="toMoreApps">
						<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
					</view>
				</view>
				<block v-if="appList_score.length>0">
					<view class="loading-container" v-if="apploading">
						<u-loading mode="circle" size="36"></u-loading>
					</view>
					<block v-else>
						<view v-for="(item, index) in appList_score.slice(0, 6)" class="app-box" style="padding: 20rpx;" :key="index" v-if="item">
							<view class="app-box-body" @tap="toAppInfo(item.id)">
								<view class="app-box-logo">
									<u-image :src="item.logo" width="110rpx" height="110rpx" mode="aspectFill"
										:lazy-load="true" :fade="true" duration="450" border-radius="28rpx">
										<u-loading slot="loading"></u-loading>
									</u-image>
								</view>
								<view class="app-box-content">
									<view class="app-box-title text-cut">{{item.name}}</view>
									<view class="app-box-info">
										<text :style="{color: item.tagInfo.color}"
											:class="item.score>=3?'tn-icon-star-fill':'tn-icon-star'"></text>
										<text :style="{color: item.tagInfo.color}">{{item.score}}</text>
										<text>{{item.size}}</text>
										<text>v{{item.version}}</text>
										<text :class="item.system=='ios'?'tn-icon-iphone':''"></text>
									</view>
									<view class="app-box-tags">
										<text class="app-tag"
											:style="{backgroundColor: item.tagInfo.color}">{{item.tagInfo.text}}</text>
										<text v-for="(category, idx) in item.sortJson" :key="idx" v-if="category"
											class="app-category-tag">{{category.name}}</text>
									</view>
								</view>
							</view>
							<view class="app-box-down" @tap="toAppInfo(item.id)">{{$t('common.download')}}</view>
						</view>
					</block>
				</block>
				<block v-else>
					<view class="margin-top-sm">
						<u-empty text="$t('global.nodata')" mode="data" icon-size="100" font-size="24"></u-empty>
					</view>
				</block>
			</view>
			<!-- #endif -->
		</block>
		<!-- 应用列表模块 end-->

		<!-- 应用宫格模块 start-->
		<block v-if="tabCurTab==isLoging&&sy_appbox">
			<!-- #ifdef APP || H5 -->
			<view class="bg-white margin-top-sm" v-if="tabCurTab==isLoging">
				<view style="display: flex;justify-content: space-between;">
					<view style="padding: 20rpx 30rpx;font-weight: bold;font-size: 36upx;">
						{{$t('tabpage.home.findapply')}}
					</view>
					<view class="action more" @tap="toMoreApps" style="padding: 20rpx 30rpx;">
						<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
					</view>
				</view>
				<appItemGrid 
					:items="appList_random" 
					@tap="toAppInfo"
					:showDownloadBtn="false"
					:isDark="isDark"
				></appItemGrid>
			</view>
			<!-- #endif -->
		</block>
		<!-- 应用宫格模块 end-->

		<!-- 商品横向滑动卡片模块 start-->
		<block v-if="shopof==1&&tabCurTab==isLoging">
			<view class="horizontal-articles" v-if="shopList_sellNum && shopList_sellNum.length > 0">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					{{$t('tabpage.home.bestseller')}}
				</view>
				<view class="action more" @tap="toMoreShop">
				<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
				</view>
			</view>
			<scroll-view class="scroll-articles scroll-articles-padding" scroll-x="true" show-scrollbar="false">
				<view class="scroll-articles-content">
					<view class="article-card-item" v-for="(item, index) in shopList_sellNum" :key="index" v-if="item">
						<shopCardHorizontal :item="item" :showFields="['num','shopName']" :isDark="isDark" />
					</view>
				</view>
			</scroll-view>
			</view>
		</block>
		<!-- 商品横向滑动卡片模块 end -->

		<!-- 商品列表模块 start-->
		<block v-if="shopof==1&&tabCurTab==isLoging">
			<view class="vertical-articles" v-if="shopList_created && shopList_created.length > 0">
			<view class="cu-bar bg-white">
				<view class="action data-box-title">
					{{$t('tabpage.home.productsale')}}
				</view>
				<view class="action more" @tap="toMoreShop">
					<text class="more">{{$t('global.all')}}</text><text class="cuIcon-right more"></text>
				</view>
			</view>
			<view class="shop-list-single">
				<view v-for="(item, index) in shopList_created" :key="index">
				<shopCardList :item="item" :showFields="['sellNum','num','shopName']" :isDark="isDark" />
				</view>
			</view>
			</view>
		</block>
		<!-- 商品列表模块 end -->

<!-- 可装修部分 end-->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- 以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！以下请勿修改！ -->

<!-- #ifdef APP || H5 -->
		<!-- 修改排序选择器 -->
		<u-picker v-model="showOrder" :show="showOrder" :columns="[orderOptions]" @confirm="confirmOrder"
				@cancel="cancelOrder" mode="selector" :range="orderOptions" range-key="text"></u-picker>

			<!-- 系统筛选弹窗 -->
			<u-popup v-model="showSystem" mode="bottom" :mask-close-able="true" :safe-area-inset-bottom="true"
				@close="showSystem = false">
				<view class="filter-popup">
					<view class="filter-title">{{$t('global.selectsystem')}}</view>
					<view class="filter-options">
						<view class="filter-option" v-for="(sys, index) in systemOptions" :key="index" v-if="sys"
							:class="{'active': selectedSystem === sys.value}" @tap="selectSystem(sys.value)">
							{{sys.label}}
						</view>
					</view>
					<view class="filter-buttons">
						<view class="btn-reset" @tap="resetSystem">{{$t('common.reset')}}</view>
						<view class="btn-confirm" @tap="confirmSystem">{{$t('common.sure')}}</view>
					</view>
				</view>
			</u-popup>

			<!-- 类型筛选弹窗 -->
			<u-popup v-model="showType" mode="bottom" :mask-close-able="true" :safe-area-inset-bottom="true"
				@close="showType = false">
				<view class="filter-popup">
					<view class="filter-title">{{$t('global.selecttype')}}</view>
					<view class="filter-options">
						<view class="filter-option" v-for="(type, index) in typeOptions" :key="index" v-if="type"
							:class="{'active': selectedType === type.value}" @tap="selectType(type.value)">
							{{$type.label}}
						</view>
					</view>
					<view class="filter-buttons">
						<view class="btn-reset" @tap="resetType">{{$t('common.reset')}}</view>
						<view class="btn-confirm" @tap="confirmType">{{$t('common.sure')}}</view>
					</view>
				</view>
			</u-popup>
			<!-- #endif -->
		<!--加载遮罩-->
		<view class="loading" v-if="isLoading==0&&!isLoginding">
			<view class="loading-main">
				<image src="../../static/loading.gif"></image>
			</view>
		</view>
		<!--加载遮罩结束-->
		<!--登录遮罩-->
		<view class="full-noLogin" v-if="noLogin">
			<view class="full-noLogin-main">
				<view class="full-noLogin-text">
					{{$t('global.loginafterview')}}
				</view>
				<view class="full-noLogin-btn">
					<view class="cu-btn bg-blue" @tap="goLogin()">
						{{$t('global.loginnow')}}
					</view>
				</view>
			</view>
		</view>
		<!--登录遮罩结束-->
		<view style="width: 100%; height: 100upx;background-color: #f6f6f6;"></view>
	</view>
</template>

<script>
	import template_page_mixin from '@/components/template_page_mixin.js'
	import darkModeMixin from '@/utils/darkModeMixin.js'
	import { homeDataConfig, getShopSortTypes, getSpaceSortTypes } from '@/utils/pageConfig.js'

	import waves from '@/components/xxley-waves/waves.vue';
	import { localStorage } from '../../js_sdk/mp-storage/mp-storage/index.js'
	
	import articleCardHorizontal from '../components/articleCardHorizontal.vue'
	import postCardHorizontal from '../components/postCardHorizontal.vue'
	import appItemGrid from '../components/appItemGrid.vue'
	import appItemHorizontal from '../components/appItemHorizontal.vue'
	import shopCardHorizontal from '../components/shopCardHorizontal.vue'
	import shopCardList from '../components/shopCardList.vue'
	import spaceItem from '../components/spaceItem.vue'
	
	export default {
		props: {
			curPage: {
				type: Number,
				default: 0
			},
			isDark:{
				type: Boolean,
				default: false
			}
		},
		mixins: [darkModeMixin],
		name: "home",
		data() {
			return {
				StatusBar: this.StatusBar,
				CustomBar: this.CustomBar+15,
				NavBar: this.StatusBar + this.CustomBar,
				iconimg: [],
				isLoginding: false,
				sqshow: true,
				sq1: true,
				sq2: false,
				sq3: false,
				isLogin: false,
				apploading: false,
				cardCur: 0,
				swiperList: [],
				rightList: [],
				leftList: [],
				contentsList: [],

				metaList: [],
				Topic: [],
				dotStyle: false,
				homeStyle: 1,
				swiperHeight: this.$API.SPhomeSwiperHeight(),
				towerStart: 0,
				direction: '100000',
				noticeSumof: false,
				noticeList: "",
				TabCur: 0,
				scrollLeft: 0,
				avatarurl: "../../static/user/avatar.png",
				page: 1,
				apppage: 1,
				moreText: $t('common.loadmoretxt'),
				isLoad: 0,
				noticeBarKey: 0,
				isLoging: 1,
				tabCurTab: 1,
				token: "",
				homeMode: 0, //首页模式
				topStyle: 0,
				actStyle: 0,
				swiperStyle: true,
				swiperOf: 0,
				iconOf: 0,
				noticeOf: 1,
				rzImg: this.$API.SPRz(),
				circleOf: 0,
				isLoading: 0,
				sousuok: "",
				dataLoad: true,
				hometop: 0,
				lunbo_of: 0,
				gonggao_of: 0,
				top_of: 0,
				shopLoading: false,
				pushAds: [],
				pushAdsInfo: null,
				bannerAds: [],
				
				bannerAdsInfo: null,
				submitStatus1: false,
				submitStatus2: false,
				submitStatus4: false,
				submitStatus5: false,
				current: 1,
				topList: [{
						order: "follow",
						name: $t('common.nofollow'),
						parent: 0
					}, {
						order: "replyTime",
						name: $t('global.reply'),
						parent: 0
					},
					{
						order: "created",
						name: $t('global.uptodate'),
						parent: 0
					},

					{
						order: "views",
						name: $t('global.hot'),
						parent: 0
					},
					{
						order: "likes",
						name: $t('global.like'),
						parent: 0
					}

				],
				isHuaWei: this.$API.isHuaWei(),
				wzof: 0,
				isShowTop: this.$API.GetisShowTop(),
				tzof: 0,
				shopof: 0,
				appList_created: [],
				appList_score: [],
				appList_commentsNum: [],
				appList_random: [],
				postList: [],
				postList_follow: [],
				postList_top: [],
				postList_replyTime: [],
				postList_created: [],
				postList_views: [],
				postList_likes: [],
				contentsList_created: [],
				contentsList_replyTime: [],
				contentsList_likes: [],
				contentsList_views: [],
				contentsList_commentsNum: [],
				orderCur: "replyTime",
				isSticky: false,
				
				recommendSectionList: [],
				noticeSum: 0,
				swiperList2: [],
				userInfo: null,
				token: "",
				gonggao: "",
				isTy: false,
				noLogin: false,
				sy_appbox: false,
				
				appTopOf: 1,
				homeModApp: 0,
				isvip: 0,
				uid: 0,
				scrollTop: 0,
				identifyCompany: 0,
				shopList: [],
				shopList_sellNum: [],
				shopList_created: [],
				//软件库
				appiconimg: [],
				applist: [],
				
				// 动态相关
				spaceof: 1,
				spaceList_follow: [],
				spaceList_created: [],
				spaceList_likes: [],
				curIMG: "../../static/page/pic.png",
				spaceLoading: false,

				// 排序相关
				showOrder: false,
				orderOptions: [{
						text: $t('global.latestpost'),
						value: 'created'
					},
					{
						text: $t('global.ravereview'),
						value: 'score'
					},
					{
						text: $t('global.discusshot'),
						value: 'commentsNum'
					},
					{
						text: $t('global.lookaround'),
						value: 'random'
					}
				],
				selectedOrder: 'created',
				orderText: $t('global.latestpost'),

				// 系统筛选
				showSystem: false,
				systemOptions: [{
						label: $t('global.all'),
						value: ''
					},
					{
						label: 'Android',
						value: 'android'
					},
					{
						label: 'IOS',
						value: 'ios'
					}
				],
				selectedSystem: '',
				systemText: $t('global.system'),

				// 类型筛选  
				showType: false,
				typeOptions: [{
						label: $t('global.all'),
						value: ''
					},
					{
						label: $t('global.transport'),
						value: '1'
					},
					{
						label: $t('global.original'),
						value: '2'
					},
					{
						label: $t('global.goldlabel'),
						value: '3'
					},
					{
						label: $t('global.official'),
						value: '4'
					}
				],
				tagMap: {
					1: {
						text: $t('global.transport'),
						color: '#7c72ff'
					},
					2: {
						text: $t('global.original'),
						color: '#19be6b'
					},
					3: {
						text: $t('global.goldlabel'),
						color: '#ff6600'
					},
					4: {
						text: $t('global.official'),
						color: '#2979ff'
					}
				},
				selectedType: '',
				typeText: $t('global.type'),
				loadStatus: 'nomore',
				isComponentReady: false,
				shopLoading: false
			}
		},

		mounted() {
			var that = this;
			// 延迟设置组件就绪状态，避免DOM访问错误
			that.$nextTick(() => {
				setTimeout(() => {
					that.isComponentReady = true;
				}, 300);
			});
			
			uni.$on('onShow', function(data) {
				if (Number(data) != Number(that.curPage)) {
					return false;
				}
				if (that.isHuaWei == 1) {
					that.openAuth();
				}
				uni.$emit('tOnLazyLoadReachBottom');
				that.updateNoticeList();
				localStorage.setItem('topList', JSON.stringify(that.topList));
				if (localStorage.getItem('userinfo')) {

					that.userInfo = JSON.parse(localStorage.getItem('userinfo'));
					that.userInfo.style = "background-image:url(" + that.userInfo.avatar + ");"
					that.group = that.userInfo.group;
					that.avatarurl = that.userInfo.avatar
					that.uid = that.userInfo.uid
					that.isvip = that.userInfo.isvip;
				} else {
					that.userInfo = null;
				}
				if (localStorage.getItem('token')) {

					that.token = localStorage.getItem('token');
				} else {
					that.token = "";
				}
				// #ifdef APP
				//如果启动图还没有缓存过，第一次进来就不显示启动图了
				if (!localStorage.getItem('appStart')) {
					that.isStart = true;
				}
				////plus.navigator.setStatusBarStyle("dark")
				// #endif
				//获取缓存
				// 获取已开启的插件列表
				var cachedPlugins = localStorage.getItem('getPlugins');
				if (cachedPlugins) {
					const pluginList = JSON.parse(cachedPlugins);
					// 检查插件是否存在于插件列表中 
					// #ifdef APP || H5
					that.sy_appbox = pluginList.includes('sy_appbox');
					// #endif
				}
				if (localStorage.getItem('token')) {

					that.token = localStorage.getItem('token');
				}
				//清除应用详情标识缓存
				if (localStorage.getItem('isinfoback')) {
					localStorage.removeItem('isinfoback');
				}
				that.userStatus();
				that.unreadNum();
				if (that.noticeSum > 0 && that.noticeSum <= 99) {
					that.noticeSumof = true;
				} else if (that.noticeSum > 99) {
					that.noticeSumof = true;
					noticeSum = "99+"
				}

				// 检查是否需要刷新数据
				that.checkAndRefreshData();
			});
			uni.$on('onReachBottom', function(data) {
				if (Number(data) != Number(that.curPage)) {
					return false;
				}
				if (that.isLoad == 0) {
					that.loadMore();
				}
			});

			uni.$on('onPullDownRefresh', function(data) {
				if (Number(data) != Number(that.curPage)) {
					return false;
				}
				that.page = 1;
				if (that.sy_appbox) {
					that.getAppBoxInfo();
				} else {
					that.getSet();
				}
				that.getGongg();
				that.getadimg();
				that.getIconimg();
				that.userStatus();
				that.unreadNum();
			});
			// #ifdef APP || MP
			that.NavBar = that.CustomBar;
			// #endif
		},
		beforeDestroy() {
			uni.$off('onReachBottom')
			uni.$off('onShow')
			uni.$off('onPullDownRefresh')
		},
		created() {
			var that = this;
			var cachedPlugins = localStorage.getItem('getPlugins');
			if (cachedPlugins) {
				const pluginList = JSON.parse(cachedPlugins);
				// 检查插件是否存在于插件列表中 
				// #ifdef APP || H5
				that.sy_appbox = pluginList.includes('sy_appbox');
				// #endif
			}
			if (that.sy_appbox) {
				that.getAppBoxInfo();
			} else {
				that.getSet();
			}
			that.getGongg();

			that.getadimg();
			that.getIconimg();
			that.allCache();
			that.getCID();

			// #ifdef APP || H5
			if (that.isvip == 0) {
				that.getAdsCache();
				that.getAds();
			}
			// #endif
		},
		methods: {
			updateNoticeList() {
				var that = this;
				if (localStorage.getItem('noticeList')) {
					that.noticeList = localStorage.getItem('noticeList');
				}
				that.noticeBarKey += 1;
			},
			getIconimg() {
				var that = this;
				uni.request({
					url: that.$API.SPiconimg(),
					method: 'GET',
					dataType: "json",
					success(res) {
						if (res.data instanceof Array) {
							that.iconimg = res.data;
						} else {
							that.iconimg = Object.values(res.data);
						}
						localStorage.setItem('iconimg', JSON.stringify(that.iconimg));
					},
					fail(error) {
						
					}
				});
			},
			getGongg() {
				var that = this;
				uni.request({
					url: that.$API.SPgonggao(),
					method: 'GET',
					dataType: "json",
					success(res) {
						that.flag = res.data.flag;
						that.findtop = res.data.findtop;
						that.hometop = res.data.hometop;
						that.noticeList = res.data.gonggao;
						that.lunbo_of = res.data.lunbo_of;
						that.gonggao_of = res.data.gonggao_of;
						that.top_of = res.data.top_of;
						that.act_of = res.data.act_of;
						that.weburl = res.data.weburl;
						that.gonggaotime = res.data.ggtime;
						localStorage.setItem('noticeList', that.noticeList);
					},
					fail(error) {
						
					}
				})

			},
			getSet() {
				var that = this;
				uni.request({
					url: that.$API.SPset(),
					method: 'GET',
					dataType: "json",
					success(res) {
						if (that.sy_appbox && that.homeModApp == 1) {
							// #ifdef APP || H5
							that.homeMode = 3;
							// #endif
							// #ifdef MP
							that.homeMode = res.data.homeMode;
							// #endif
						} else {
							that.homeMode = res.data.homeMode;
						}
						that.topStyle = res.data.topStyle;
						that.actStyle = res.data.actStyle;
						that.circleOf = res.data.circleOf;
						that.tabCurTab = res.data.swiperinfo;
						that.swiperStyle = res.data.swiperStyle;
						that.swiperOf = res.data.swiperOf;
						that.iconOf = res.data.iconOf;
						that.wzof = res.data.wzof;
						that.tzof = res.data.tzof;
						that.shopof = res.data.shopof;
						localStorage.setItem('tabCurTab', that.tabCurTab);
						that.isLoginding = true;
						that.loading();
					},
					fail(error) {
						
					}
				})

			},
			goAds(data) {
				var url = data.url;
				var type = data.urltype;
				// #ifdef APP
				if (type == 1) {
					plus.runtime.openURL(url);
				}
				if (type == 0) {
					plus.runtime.openWeb(url);
				}
				// #endif
				// #ifdef H5
				window.open(url)
				// #endif
			},
			//获取客户端id用于消息通知
			getCID() {
				var that = this;
				let cid = ''
				// #ifdef APP
				let pinf = plus.push.getClientInfo();
				cid = pinf.clientid;
				if (cid) {
					that.setClientId(cid);
				}
				// #endif
			},

			getRz(uid) {
				var that = this;
				that.$Net.request({
					url: that.$API.identifyStatus(),
					data: {
						"uid": uid
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 1) {
							that.identifyCompany = res.data.data.identifyCompany;
							localStorage.setItem('identifyCompany', that.identifyCompany);
						}
						var timer = setTimeout(function() {
							clearTimeout('timer')
						}, 300)
					},
					fail: function(res) {
						var timer = setTimeout(function() {
							clearTimeout('timer')
						}, 300)
					}
				})
			},

			handleSticky() {
				this.isSticky = true;
			},
			handleUnsticky() {
				this.isSticky = false;
			},
			setClientId(cid) {
				var that = this;
				var token = "";
				if (localStorage.getItem('token')) {
					token = localStorage.getItem('token');
				} else {
					return false;
				}
				that.$Net.request({
					url: that.$API.setClientId(),
					data: {
						"clientId": cid,
						"token": token
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 1) {

						}
					},
					fail: function(res) {
						uni.showToast({
							title: that.$t('common.networkfail'),
							icon: 'none'
						})
					}
				})
			},
			// 瀑布流加载完毕事件
			handleWaterFallFinish() {

			},
			//获取并缓存广告
			getAds() {
				var that = this;
				// #ifdef APP || H5
				//获取推流广告
				that.getAdsList(0);
				//获取横幅广告
				that.getAdsList(1);
				// #endif
				// #ifdef APP
				//获取启动图广告
				that.getAdsList(2);
				// #endif
			},
			getAdsCache() {
				var that = this;
				if (localStorage.getItem('pushAds')) {
					that.pushAds = JSON.parse(localStorage.getItem('pushAds'));
				}

				if (localStorage.getItem('bannerAds')) {
					that.bannerAds = JSON.parse(localStorage.getItem('bannerAds'));

					var num = that.bannerAds.length;
					if (num > 0) {
						var rand = Math.floor(Math.random() * num);
						that.bannerAdsInfo = that.bannerAds[rand];
					}
				}
			},

			getAdsList(type) {
				var that = this;
				var data = {
					"type": type,
				}
				that.$Net.request({
					url: that.$API.adsList(),
					data: {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": 100,
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 1) {
							var list = res.data.data;
							if (type == 0) {
								that.pushAds = res.data.data;
								localStorage.setItem('pushAds', JSON.stringify(that.pushAds));
							}
							if (type == 1) {
								that.bannerAds = res.data.data;
								localStorage.setItem('bannerAds', JSON.stringify(that.bannerAds));
							}
							if (type == 2) {
								that.startAds = res.data.data;
								localStorage.setItem('startAds', JSON.stringify(that.startAds));
							}
						}
					},
					fail: function(res) {

					}
				})
			},
			//轮播图
			swiperclick(index) {
				const item = this.swiperList[index];
				if (item.type === 'wzimage') {
					this.toInfo(item,'wz')
				} else if (item.type === 'tzimage') {
					this.toInfo(item,'tz')
				} else if (item.type === 'appimage') {
					this.toAppInfo(item.id);
				} else {
					this.goAds2(item.zt);
				}
			},
			goAds2(url) {
				// #ifdef APP
				plus.runtime.openWeb(url);
				// #endif
				// #ifdef H5
				window.open(url)
				// #endif
			},
			goMsg() {
				var that = this;
				if (!localStorage.getItem('token') || localStorage.getItem('token') == "") {
					uni.showToast({
						title: that.$t('common.plslogin'),
						icon: 'none'
					})
					return false;
				}
				uni.$emit('goMsg', 2);
			},
			goAds(data) {
				var url = data.url;
				var type = data.urltype;
				// #ifdef APP
				if (type == 1) {
					plus.runtime.openURL(url);
				}
				if (type == 0) {
					plus.runtime.openWeb(url);
				}
				// #endif
				// #ifdef H5
				window.open(url)
				// #endif
			},
			//全部请求
			loading() {
				var that = this;
				// that.page = 1;
				//that.getSwiper();
				//根据首页模式获取不同的轮播图
				if (that.homeMode == 1) {
					that.getSwiper();
				}
				if (that.homeMode == 2) {
					that.getSwiperList();
				}
				if (that.homeMode == 3) { //软件库模式
					that.getAppSwiperList();
				}
				if(that.wzof == 1){
					that.getRecommendSectionList();
					that.getContentsList(false);
				}
				if(that.tzof == 1){
					that.getTopPic();
					that.getMetaList();
					that.getPostList(false, false);
				}
				if(that.shopof == 1){
					that.getShopList();
				}
				if(that.spaceof == 1){
					that.getSpaceList();
				}
				// 只有当sy_appbox为true时才加载应用相关数据
				if(that.sy_appbox){
					that.getAppList();
					that.getTopAppList();
				}
				
			},
			loadMore() {
				var that = this;
				that.moreText = that.$t('global.loading');
				that.isLoad = 1;
				// if (that.wzof == 1) {
				// 	that.getContentsList(true);
				// }
				// if (that.tzof == 1) {
				// 	that.getPostList(true, false);
				// }
				// if (that.sy_appbox) {
				// 	that.getAppList(true);
				// }
			},
			//公共缓存
			allCache() {
				var that = this;
				var meta = that.TabCur;

				if (localStorage.getItem('tabCurTab')) {
					that.tabCurTab = localStorage.getItem('tabCurTab');
				}
				if (localStorage.getItem('swiperList2')) {
					that.swiperList2 = JSON.parse(localStorage.getItem('swiperList2'));
				}
				if (localStorage.getItem('swiperList')) {
					that.swiperList = JSON.parse(localStorage.getItem('swiperList'));
					var timer = setTimeout(function() {
						that.isLoading = 1;
						clearTimeout('timer')
					}, 300)
				}
				if (localStorage.getItem('identifyCompany')) {
					that.identifyCompany = localStorage.getItem('identifyCompany');
				} else {
					that.getRz()
				}
				if (localStorage.getItem('iconimg')) {
					that.iconimg = JSON.parse(localStorage.getItem('iconimg'));
				}

				if (localStorage.getItem('noticeList')) {
					that.noticeList = localStorage.getItem('noticeList');
				}
				if (localStorage.getItem('recommendSectionList')) {
					that.recommendSectionList = JSON.parse(localStorage.getItem('recommendSectionList'));
				}
				if (localStorage.getItem('shopList')) {
					that.shopList = JSON.parse(localStorage.getItem('shopList'));
				}
				if (localStorage.getItem('shopList_sellNum')) {
					that.shopList_sellNum = JSON.parse(localStorage.getItem('shopList_sellNum'));
				}
				if (localStorage.getItem('shopList_created')) {
					that.shopList_created = JSON.parse(localStorage.getItem('shopList_created'));
				}
				if (localStorage.getItem('postList')) {
					that.postList = JSON.parse(localStorage.getItem('postList'));
				}
				if (localStorage.getItem('metaList')) {
					that.metaList = JSON.parse(localStorage.getItem('metaList'));
				}
				if (localStorage.getItem('contentsList_0')) {
					that.contentsList = JSON.parse(localStorage.getItem('contentsList_0'));
				}
				if (localStorage.getItem('Topic')) {
					that.Topic = JSON.parse(localStorage.getItem('Topic'));
				}
				if (localStorage.getItem('contentsList_created')) {
					that.contentsList_created = JSON.parse(localStorage.getItem('contentsList_created'));
				}
				if (localStorage.getItem('contentsList_replyTime')) {
					that.contentsList_replyTime = JSON.parse(localStorage.getItem('contentsList_replyTime'));
				}
				if (localStorage.getItem('contentsList_likes')) {
					that.contentsList_likes = JSON.parse(localStorage.getItem('contentsList_likes'));
				}
				if (localStorage.getItem('contentsList_views')) {
					that.contentsList_views = JSON.parse(localStorage.getItem('contentsList_views'));
				}
				if (localStorage.getItem('contentsList_commentsNum')) {
					that.contentsList_commentsNum = JSON.parse(localStorage.getItem('contentsList_commentsNum'));
				}
				if (localStorage.getItem('appList_created')) {
					that.appList_created = JSON.parse(localStorage.getItem('appList_created'));
				}
				if (localStorage.getItem('appList_score')) {
					that.appList_score = JSON.parse(localStorage.getItem('appList_score'));
				}
				if (localStorage.getItem('appList_commentsNum')) {
					that.appList_commentsNum = JSON.parse(localStorage.getItem('appList_commentsNum'));
				}
				if (localStorage.getItem('appList_random')) {
					that.appList_random = JSON.parse(localStorage.getItem('appList_random'));
				}
				if (localStorage.getItem('postList_follow')) {
					that.postList_follow = JSON.parse(localStorage.getItem('postList_follow'));
				}
				if (localStorage.getItem('postList_top')) {
					that.postList_top = JSON.parse(localStorage.getItem('postList_top'));
				}
				if (localStorage.getItem('postList_replyTime')) {
					that.postList_replyTime = JSON.parse(localStorage.getItem('postList_replyTime'));
				}
				
				if (localStorage.getItem('postList_created')) {
					that.postList_created = JSON.parse(localStorage.getItem('postList_created'));
				}
				if (localStorage.getItem('postList_views')) {
					that.postList_views = JSON.parse(localStorage.getItem('postList_views'));
				}
				if (localStorage.getItem('spaceList_follow')) {
					that.spaceList_follow = JSON.parse(localStorage.getItem('spaceList_follow'));
				}
				if (localStorage.getItem('spaceList_created')) {
					that.spaceList_created = JSON.parse(localStorage.getItem('spaceList_created'));
				}
				if (localStorage.getItem('spaceList_likes')) {
					that.spaceList_likes = JSON.parse(localStorage.getItem('spaceList_likes'));
				}
			},
			change(index) {
				var that = this;
				if (index == 0) {
					if (!localStorage.getItem('token')) {
						uni.showToast({
							title: that.$t('common.plslogin'),
							icon: 'none'
						})
						return false;
					}
				}
				that.current = index;
				that.orderCur = that.topList[that.current].order;
				console.log(that.orderCur + index);
				that.page = 1;
				if (index == 0) {
					that.getFollowPostList(false);
				} else {
					that.getPostList(false, false);
				}

			},
			getSpaceList() {
				var that = this;
				// 防止重复请求
				if (that.spaceLoading) {
					return false;
				}
				that.spaceLoading = true;
				var token = "";
				if (localStorage.getItem('userinfo')) {
					var userInfo = JSON.parse(localStorage.getItem('userinfo'));
					token = userInfo.token;
				}
				var data = {
					"status": 1
				}
				// 根据配置获取需要请求的排序类型
				const orders = getSpaceSortTypes();
				// 使用计数器管理并发请求
				let completedRequests = 0;
				const totalRequests = orders.length;
				// 遍历配置中的排序类型发起请求
				orders.forEach(order => {
					var url = that.$API.spaceList();
					var requestData = {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": homeDataConfig.dataLimits.space || 8,
						"page": 1,
						"token": token
					};
					
					// 如果是关注动态，需要特殊处理
					if (order === 'follow') {
						url = that.$API.followSpace();
					} else {
						requestData.order = order;
					}
					
					that.$Net.request({
						url: url,
						data: requestData,
						header: {
							'Content-Type': 'application/x-www-form-urlencoded'
						},
						method: "get",
						dataType: 'json',
						success: function(res) {
							if (res.data.code == 1) {
								var list = res.data.data;
								// 处理图片列表
								var processedList = [];
								for (var i in list) {
									if (list[i].type == 0) {
										if (list[i].pic) {
											var pic = list[i].pic;
											list[i].picList = pic.split("||");
										} else {
											list[i].picList = [];
										}
									}
									if (list[i].type == 2) {
										if (list[i].forwardJson.pic) {
											var pic = list[i].forwardJson.pic;
											list[i].forwardJson.picList = pic.split("||");
										} else {
											list[i].forwardJson.picList = [];
										}
									}
									processedList.push(list[i]);
								}
								
								// 根据排序类型存储到对应数组
								switch(order) {
									case 'follow':
										that.spaceList_follow = processedList;
										localStorage.setItem('spaceList_follow', JSON.stringify(processedList));
										break;
									case 'created':
										that.spaceList_created = processedList;
										localStorage.setItem('spaceList_created', JSON.stringify(processedList));
										break;
									case 'likes':
										that.spaceList_likes = processedList;
										localStorage.setItem('spaceList_likes', JSON.stringify(processedList));
										break;
								}
							}
							// 使用计数器管理状态
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.spaceLoading = false;
							}
						},
						fail: function(res) {
							uni.showToast({
								title: that.$t('common.networkfail'),
								icon: 'none'
							})
							// 失败时也要更新计数器
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.spaceLoading = false;
							}
						}
					})
				});
			},
			getShopList() {
				var that = this;
				
				// 防止重复请求
				if (that.shopLoading) {
					return false;
				}
				that.shopLoading = true;
				
				var data = {
					"status": "1",
					"isView": "1"
				}
				
				// 根据配置获取需要请求的排序类型
				const orders = getShopSortTypes();
				
				// 使用计数器管理并发请求
				let completedRequests = 0;
				const totalRequests = orders.length;
				
				// 遍历配置中的排序类型发起请求
				orders.forEach(order => {
					that.$Net.request({
						url: that.$API.shopList(),
						data: {
							"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
							"limit": homeDataConfig.dataLimits.shop || 8,
							"page": 1,
							"order": order
						},
						header: {
							'Content-Type': 'application/x-www-form-urlencoded'
						},
						method: "get",
						dataType: 'json',
						success: function(res) {
							if (res.data.code == 1) {
								var list = res.data.data;
								// 根据排序类型存储到对应数组
								switch(order) {
									case 'sellNum':
										that.shopList_sellNum = list;
										localStorage.setItem('shopList_sellNum', JSON.stringify(list));
										break;
									case 'created':
										that.shopList_created = list;
										localStorage.setItem('shopList_created', JSON.stringify(list));
										break;
								}
								// 保持原有的shopList变量（向后兼容）
								if (order === 'sellNum') {
									that.shopList = list;
									localStorage.setItem('shopList', JSON.stringify(that.shopList));
								}
							}
							// 使用计数器管理状态
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.shopLoading = false;
							}
						},
						fail: function(res) {
							uni.showToast({
								title: that.$t('common.networkfail'),
								icon: 'none'
							})
							// 失败时也要更新计数器
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.shopLoading = false;
							}
						}
					})
				});
			},
			goAllSection() {
				uni.navigateTo({
					url: '/pages/forum/section'
				});
			},
			goSection(id) {
				uni.navigateTo({
					url: '/pages/forum/home?id=' + id
				});
			},
			getAppSwiperList() {
				var that = this;
				// 如果sy_appbox为false，直接返回不请求
				if (!that.sy_appbox) {
					return;
				}
				var data = {
					isswiper: '1'
				};
				uni.request({
					url: that.$API.PluginLoad('sy_appbox'),
					data: {
						"action": "getAppList",
						"getapp_page": 1,
						"getapp_limit": homeDataConfig.dataLimits.app || 12,
						"getapp_order": "created",
						"getapp_if": JSON.stringify(that.$API.removeObjectEmptyKey(data))
					},
					method: 'GET',
					dataType: "json",
					success(res) {
						if (res.data.code == 200) {
							const list = res.data.data || [];
							// 转换数据格式以适配轮播图组件
							that.swiperList = list.map(item => {
								return {
									id: item.id,
									type: 'appimage',
									url: item.logo,
									title: item.name.length > 10 ? item.name.substring(0,10) + '...' : item.name,
									score: item.score,
									scoreNum: Number(item.score),
									intro: (item.versionInfo || '').length > 10 ? (item.versionInfo || '').substring(0,10) + '...' : (item.versionInfo || '')
								};
							});
							that.swiperList = that.swiperList;
							localStorage.setItem('swiperList', JSON.stringify(that.swiperList));
						} else {
							
						}
					},
					fail(error) {
						uni.showToast({
							title: that.$t('common.networkfail'),
							icon: 'none'
						});
					}
				});
			},
			getAppList(isPage) {
				var that = this;
				// 如果sy_appbox为false，直接返回不请求
				if (!that.sy_appbox) {
					return;
				}
				if (that.apploading) return;
				if (!isPage) {
					that.apppage = 1;
					that.dataLoad = true;
					that.apploading = true;
				}
				var page = that.apppage;
				var token = "";
				if (localStorage.getItem('userinfo')) {
					var userInfo = JSON.parse(localStorage.getItem('userinfo'));
					token = userInfo.token;
				}
				if (isPage) {
					page++;
				}
				var data = {
					type: that.selectedType,
					system: that.selectedSystem,
				};
				
				// 根据配置获取需要请求的排序类型
				const orders = homeDataConfig.appSortTypes || [];
				
				// 使用计数器管理并发请求
				let completedRequests = 0;
				const totalRequests = orders.length;
				
				// 遍历配置中的排序类型发起请求
				orders.forEach(order => {
					uni.request({
						url: that.$API.PluginLoad('sy_appbox'),
						data: {
							"action": "getAppList",
							"getapp_page": 1,
							"getapp_limit": homeDataConfig.dataLimits.app || 12,
							"getapp_order": order,
							"getapp_if": JSON.stringify(that.$API.removeObjectEmptyKey(data))
						},
						method: 'GET',
						dataType: "json",
						success(res) {
							if (res.data.code == 200) {
								// 处理返回数据
								const data = res.data.data || [];
								const list = data.map(item => {
									return {
										...item,
										tagInfo: that.tagMap[item.type] || {
											text: that.$t('global.unknown'),
											color: '#999'
										},
										size: that.formatSize(item.size)
									};
								});
								// 根据排序类型存储到对应数组
								switch(order) {
									case 'created':
										that.appList_created = list;
										localStorage.setItem('appList_created', JSON.stringify(list));
										break;
									case 'score':
										that.appList_score = list;
										localStorage.setItem('appList_score', JSON.stringify(list));
										break;
									case 'commentsNum':
										that.appList_commentsNum = list;
										localStorage.setItem('appList_commentsNum', JSON.stringify(list));
										break;
									case 'random':
										that.appList_random = list;
										localStorage.setItem('appList_random', JSON.stringify(list));
										break;
								}
								// 当前选中的排序显示对应数据
								if(order === that.selectedOrder) {
									that.isLoad = 0;
									if (isPage) {
										if (data.length < 1) {
											that.moreText = that.$t('common.nomoredata');
										}
										that.applist = [...that.applist, ...list];
										that.apppage = page;
									} else {
										that.applist = list;
										that.apppage = 1;
									}
								}
							} else {
								uni.showToast({
									title: res.data.msg,
									icon: 'none'
								});
							}
							
							// 使用计数器管理状态
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.apploading = false;
							}
						},
						fail(error) {
							uni.showToast({
								title: that.$t('common.networkfail'),
								icon: 'none'
							});
							// 失败时也要更新计数器
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.apploading = false;
							}
						}
					});
				});
			},
			getTopAppList() {
				var that = this;
				// 如果sy_appbox为false，直接返回不请求
				if (!that.sy_appbox) {
					return;
				}
				var token = "";
				if (localStorage.getItem('userinfo')) {
					var userInfo = JSON.parse(localStorage.getItem('userinfo'));
					token = userInfo.token;
				}
				var data = {
					istop: '1'
				};
				var orderCur = "created";
				uni.request({
					url: that.$API.PluginLoad('sy_appbox'),
					data: {
						"action": "getAppList",
						"getapp_page": 1,
						"getapp_limit": homeDataConfig.dataLimits.topApp || 10,
						"getapp_order": orderCur,
						"getapp_if": JSON.stringify(that.$API.removeObjectEmptyKey(data))
					},
					method: 'GET',
					dataType: "json",
					success(res) {
						if (res.data.code == 200) {
							// 处理返回数据
							const list = res.data.data;
							that.appiconimg = list;
						} else {
							uni.showToast({
								title: res.data.msg,
								icon: 'none'
							});
						}
					},
					fail(error) {
						uni.showToast({
							title: that.$t('common.networkfail'),
							icon: 'none'
						});
					}
				});
			},
			goAllApp(){
				this.toLink('/pages/plugins/sy_appbox/home');
			},
			
			getSwiperList() {
				var that = this;
				var token = "";
				if (localStorage.getItem('userinfo')) {
					var userInfo = JSON.parse(localStorage.getItem('userinfo'));
					token = userInfo.token;
				}
				var data = {
					"isswiper": '1'
				}
				that.$Net.request({
					url: that.$API.postList(),
					data: {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": homeDataConfig.dataLimits.swiper || 5,
						"page": 1,
						"token": token
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 1) {
							var list = res.data.data;
							var list = res.data.data;
							var swiper = [];
							if (list.length > 0) {
								for (var i in list) {
									if (list[i].images.length > 0) {
										var arr = {
											id: list[i].id,
											type: 'tzimage',
											url: list[i].images[0],
											title: list[i].title,
											intro: that.subText(list[i].text, 20),
										}
										swiper.push(arr);
									}

								}
								that.swiperList = swiper.concat(that.swiperList2);
							} else {
								that.swiperList = that.swiperList2;

							}
							localStorage.setItem('swiperList', JSON.stringify(that.swiperList));
						}

					},
					fail: function(res) {

					}
				})
			},
			getRecommendSectionList(isLogin) {
				var that = this;
				if (that.submitStatus4) {
					return false;
				}
				that.submitStatus4 = true;
				var token = "";
				if (!isLogin) {
					localStorage.setItem('isbug', '1');
				}
				var data = {
					"isrecommend": 1,
				}
				that.$Net.request({
					url: that.$API.sectionList(),
					data: {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": homeDataConfig.dataLimits.section || 8,
						"page": 1,
						"token": token
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (!isLogin) {
							localStorage.removeItem('isbug');
						}
						that.submitStatus4 = false;
						uni.stopPullDownRefresh()
						that.isLoad = 0;
						if (res.data.code == 1) {
							var list = res.data.data;
							that.recommendSectionList = res.data.data;
							localStorage.setItem('recommendSectionList', JSON.stringify(that
								.recommendSectionList));
						} else {
							if (res.data.msg == "用户未登录或Token验证失败") {
								if (isLogin) {
									that.noLogin = true
								} else {
									that.getRecommendSectionList(true);
								}
							}
						}
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
					},
					fail: function(res) {
						if (!isLogin) {
							localStorage.removeItem('isbug');
						}
						that.submitStatus4 = false;
						uni.stopPullDownRefresh()

					}
				})
			},

			getadimg() {
				var that = this;
				uni.request({
					url: that.$API.SPadimg(),
					method: 'GET',
					dataType: "json",
					success(res) {
						that.adimage_sl = res.data.adimage_sl;
						// 清空之前的数据
						that.swiperList2 = [];
						// 动态设置swiperList2数组内容
						for (let i = 1; i <= that.adimage_sl; i++) {
							that.swiperList2.push({
								url: res.data['adimage' + i],
								zt: res.data['link_url' + i]
							});
						}
						localStorage.setItem('swiperList2', JSON.stringify(that.swiperList2));
					},
					fail(error) {
						
					}
				});
			},
			// 获取关注的帖子列表
			getFollowPostList(isPage) {
				var that = this;
				var page = that.page;
				var token = "";
				if (localStorage.getItem('userinfo')) {
					var userInfo = JSON.parse(localStorage.getItem('userinfo'));
					token = userInfo.token;
				}
				if (isPage) {
					page++;
				}
				that.$Net.request({
					url: that.$API.followPosts(),
					data: {
						"limit": 10,
						"page": page,
						"order": 'created',
						"token": token
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						that.isLoad = 0;
						if (res.data.code == 1) {
							var list = res.data.data;
							if (list.length > 0) {
								var num = res.data.data.length;
								var rand = Math.floor(Math.random() * num);
								var pushAdsInfo = null;
								// #ifdef APP || H5
								if (that.isvip == 0) {
									if (localStorage.getItem('pushAds')) {
										var pushAds = JSON.parse(localStorage.getItem('pushAds'));
										var adsNum = pushAds.length;
										if (adsNum > 0) {
											var adsRand = Math.floor(Math.random() * adsNum);
											pushAdsInfo = pushAds[adsRand];
											pushAdsInfo.isAds = 1;
										}
									}
								}
								// #endif
								var postList = [];
								for (var i in list) {
									list[i].isAds = 0;
									postList.push(list[i]);
									// #ifdef APP || H5
									var isAds = Math.round(Math.random());
									if (isAds == 1) {
										if (i == rand && pushAdsInfo != null) {
											postList.push(pushAdsInfo);
										}
									}
									// #endif
								}
								if (isPage) {
									that.page++;
									that.postList_follow = that.postList_follow.concat(postList);
									localStorage.setItem('postList_follow', JSON.stringify(that.postList_follow));
								} else {
									that.postList_follow = postList;
									localStorage.setItem('postList_follow', JSON.stringify(that.postList_follow));
								}
							} else {
								if (isPage) {
									that.moreText = that.$t('common.nomoredata');
								} else {
									that.postList_follow = [];
								}
							}
						}
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
						that.isLoading = 1;
					},
					fail: function(res) {
						that.isLoad = 0;
						that.moreText = that.$t('common.loadmoretxt');
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
						that.isLoading = 1;
					}
				})
			},
			
			// 获取所有排序的帖子列表
			getPostList(isPage, isLogin) {
				var that = this;
				if (that.submitStatus2) {
					return false;
				}
				that.submitStatus2 = true;
				
				var token = "";
				if (!isLogin) {
					localStorage.setItem('isbug', '1');
				}
				// 根据配置获取需要请求的排序类型
				const orderTypes = homeDataConfig.postSortTypes || [];
				// 过滤掉数量为0的排序类型
				const validOrderTypes = orderTypes.filter(orderType => {
					if (orderType === 'top') {
						return homeDataConfig.dataLimits.top > 0;
					}
					return true;
				});
				// 使用计数器管理并发请求
				let completedRequests = 0;
				const totalRequests = validOrderTypes.length;
				// 如果没有有效的排序类型，直接设置加载状态
				if (totalRequests === 0) {
					that.submitStatus2 = false;
					that.isLoading = 1;
					return;
				}
				// 遍历配置中的排序类型分别请求数据
				validOrderTypes.forEach(orderType => {
					// 根据排序类型设置不同的请求参数
					var requestData = {
						"status": "1"
					};
					
					// 如果是top排序，添加置顶条件
					if (orderType === 'top') {
						requestData.isTop = '2';
					}
					
					// 根据排序类型设置不同的数量限制
					var limit = orderType === 'top' ? 
						(homeDataConfig.dataLimits.top || 5) : 
						(homeDataConfig.dataLimits.post || 8);
					
					// 构建请求数据
					var requestPayload = {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(requestData)),
						"limit": limit,
						"page": 1,
						"token": token
					};
					// 如果是top排序，不添加order参数
					if (orderType !== 'top') {
						requestPayload.order = orderType;
					}
					that.$Net.request({
						url: that.$API.postList(),
						data: requestPayload,
						header: {
							'Content-Type': 'application/x-www-form-urlencoded'
						},
						method: "get",
						dataType: 'json',
						success: function(res) {
							if (res.data.code == 1) {
								var list = res.data.data;
								// top排序类型完全独立于isShowTop配置，直接使用获取到的数据
								if (orderType === 'top') {
									that.postList_top = list;
									localStorage.setItem('postList_top', JSON.stringify(list));
									// 使用计数器管理状态
									completedRequests++;
									if (completedRequests === totalRequests) {
										that.submitStatus2 = false;
										that.isLoading = 1;
									}
								} else {
									// 其他排序类型根据配置决定是否获取全局置顶帖子
									if (!isPage && that.$API.GetisShowTop()) {
										// 过滤掉普通列表中的置顶帖子（isTop为2的帖子）
										var filteredList = list.filter(item => item.isTop != '2');
										var globalData = {
											"status": "1",
											"isTop": '2'
										};
										that.$Net.request({
											url: that.$API.postList(),
											data: {
												"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(globalData)),
												"limit": 5,
												"page": 1,
												"token": token
											},
											header: {
												'Content-Type': 'application/x-www-form-urlencoded'
											},
											method: "get",
											dataType: 'json',
											success: function(globalRes) {
												if (globalRes.data.code == 1) {
													var globalTopList = globalRes.data.data;
													globalTopList.forEach(item => item.isTop = '2');
													
													// 将全局置顶帖子合并到过滤后的列表中
													var finalList = globalTopList.concat(filteredList);
													switch(orderType) {
														case 'replyTime':
															that.postList_replyTime = finalList;
															localStorage.setItem('postList_replyTime', JSON.stringify(finalList));
															break;
														case 'created':
															that.postList_created = finalList;
															localStorage.setItem('postList_created', JSON.stringify(finalList));
															break;
														case 'views':
															that.postList_views = finalList;
															localStorage.setItem('postList_views', JSON.stringify(finalList));
															break;
														case 'likes':
															that.postList_likes = finalList;
															localStorage.setItem('postList_likes', JSON.stringify(finalList));
															break;
													}
												} else {
													// 如果获取全局置顶失败，使用过滤后的列表
													switch(orderType) {
														case 'replyTime':
															that.postList_replyTime = filteredList;
															localStorage.setItem('postList_replyTime', JSON.stringify(filteredList));
															break;
														case 'created':
															that.postList_created = filteredList;
															localStorage.setItem('postList_created', JSON.stringify(filteredList));
															break;
														case 'views':
															that.postList_views = filteredList;
															localStorage.setItem('postList_views', JSON.stringify(filteredList));
															break;
														case 'likes':
															that.postList_likes = filteredList;
															localStorage.setItem('postList_likes', JSON.stringify(filteredList));
															break;
													}
												}
												// 使用计数器管理状态
												completedRequests++;
												if (completedRequests === totalRequests) {
													that.submitStatus2 = false;
													that.isLoading = 1;
												}
											},
											fail: function(globalRes) {
												// 如果获取全局置顶失败，使用过滤后的列表
												switch(orderType) {
													case 'replyTime':
														that.postList_replyTime = filteredList;
														localStorage.setItem('postList_replyTime', JSON.stringify(filteredList));
														break;
													case 'created':
														that.postList_created = filteredList;
														localStorage.setItem('postList_created', JSON.stringify(filteredList));
														break;
													case 'views':
														that.postList_views = filteredList;
														localStorage.setItem('postList_views', JSON.stringify(filteredList));
														break;
													case 'likes':
														that.postList_likes = filteredList;
														localStorage.setItem('postList_likes', JSON.stringify(filteredList));
														break;
												}
												// 使用计数器管理状态
												completedRequests++;
												if (completedRequests === totalRequests) {
													that.submitStatus2 = false;
													that.isLoading = 1;
												}
											}
										});
									} else {
										// 不显示全局置顶或分页加载时，直接使用原始列表（不过滤置顶帖子）
										switch(orderType) {
											case 'replyTime':
												that.postList_replyTime = list;
												localStorage.setItem('postList_replyTime', JSON.stringify(list));
												break;
											case 'created':
												that.postList_created = list;
												localStorage.setItem('postList_created', JSON.stringify(list));
												break;
											case 'views':
												that.postList_views = list;
												localStorage.setItem('postList_views', JSON.stringify(list));
												break;
											case 'likes':
												that.postList_likes = list;
												localStorage.setItem('postList_likes', JSON.stringify(list));
												break;
										}
										// 使用计数器管理状态
										completedRequests++;
										if (completedRequests === totalRequests) {
											that.submitStatus2 = false;
											that.isLoading = 1;
										}
									}
								}
							} else {
								// 使用计数器管理状态
								completedRequests++;
								if (completedRequests === totalRequests) {
									that.submitStatus2 = false;
									that.isLoading = 1;
								}
							}
						},
						fail: function(res) {
							uni.showToast({
								title: that.$t('common.networkfail'),
								icon: 'none'
							})
							// 失败时也要更新计数器
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.submitStatus2 = false;
								that.isLoading = 1;
							}
						}
					})
				});
			},
			getSwiper(isLogin) {
				var that = this;
				if (that.submitStatus5) {
					return false;
				}
				that.submitStatus5 = true;
				var token = "";
				if (!isLogin) {
					localStorage.setItem('isbug', '1');
				}
				var data = {
					"type": "post",
					"isswiper": 1
				}
				that.$Net.request({
					url: that.$API.getContentsList(),
					data: {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": 8,
						"page": 1,
						"order": "modified",
						"token": token
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (!isLogin) {
							localStorage.removeItem('isbug');
						}
						that.submitStatus5 = false;
						if (res.data.code == 1) {
							that.noLogin = false;
							var list = res.data.data;
							var swiper = [];
							if (list.length > 0) {
								for (var i in list) {
									if (list[i].images.length > 0) {
										var arr = {
											cid: list[i].cid,
											type: 'wzimage',
											url: list[i].images[0],
											title: list[i].title,
											intro: that.subText(list[i].text, 20),
										}
										swiper.push(arr);
									}

								}
								that.swiperList = swiper.concat(that.swiperList2);
							} else {
								that.swiperList = that.swiperList2;
							}
							localStorage.setItem('swiperList', JSON.stringify(that.swiperList));
						} else {
							if (res.data.msg == "用户未登录或Token验证失败") {
								if (isLogin) {
									that.noLogin = true
								} else {
									that.getSwiper(true)
								}
							}
						}
					},
					fail: function(res) {
						if (!isLogin) {
							localStorage.removeItem('isbug');
						}
						that.submitStatus5 = false;
					}
				})
			},

			getMetaList() {
				var that = this;
				var data = {
					"type": "category"
				}
				that.$Net.request({
					url: that.$API.getMetasList(),
					data: {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": 15,
						"page": 1,
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 1) {
							var list = res.data.data;
							if (list.length > 0) {
								var meta = [{
									mid: 0,
									name: that.$t('global.recommend'),
									parent: 0
								}];
								that.metaList = meta.concat(list);

							} else {
								that.metaList = [];
							}
							localStorage.setItem('metaList', JSON.stringify(that.metaList));
						}
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
					},
					fail: function(res) {
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
					}
				})
			},
			
			getTopPic() {
				var that = this;
				var data = {
					"isrecommend": "1"
				}
				that.$Net.request({
					url: that.$API.getMetasList(),
					data: {
						"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
						"limit": 4,
						"page": 1,
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 1) {
							var list = res.data.data;
							if (list.length > 0) {
								that.Topic = list;

							} else {
								that.Topic = [];
							}
							localStorage.setItem('Topic', JSON.stringify(that.Topic));
						}
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
					},
					fail: function(res) {
						var timer = setTimeout(function() {
							that.isLoading = 1;
							clearTimeout('timer')
						}, 300)
					}
				})
			},
			toMoreShop(){
				uni.navigateTo({
					url: '/pages/shop/shop'
				})
			},
			goAllSpace(){
				uni.$emit('goFind', 1);
			},

			getContentsList(isPage) {
				var that = this;
				if (that.submitStatus1) {
					return false;
				}
				that.submitStatus1 = true;
				var data = {
					"type": "post",
					"istop": 0,
				}
				var token = "";
				if (localStorage.getItem('userinfo')) {
					var userInfo = JSON.parse(localStorage.getItem('userinfo'));
					token = userInfo.token;
				}
				var page = that.page;
				if (isPage) {
					page++;
				}
				// 根据配置获取需要请求的排序类型
				const orders = homeDataConfig.articleSortTypes || [];
				// 使用计数器管理并发请求
				let completedRequests = 0;
				const totalRequests = orders.length;
				// 遍历配置中的排序方式获取数据
				orders.forEach(order => {
					that.$Net.request({
						url: that.$API.getContentsList(),
						data: {
							"searchParams": JSON.stringify(that.$API.removeObjectEmptyKey(data)),
							"limit": homeDataConfig.dataLimits.article || 6,
							"page": 1,
							"order": order,
							"token": token
						},
						method: "get",
						dataType: 'json',
						success: function(res) {
							if (res.data.code == 1) {
								var list = res.data.data;
								if (list.length > 0) {
									var contentsList = [];
									//将自定义字段获取并添加到数据
									var curFields = that.$API.GetFields();
									for (var i in list) {
										var fields = list[i].fields;
										if (fields.length > 0) {
											for (var j in fields) {
												if (curFields.indexOf(fields[j].name) != -1) {
													list[i][fields[j].name] = fields[j].strValue;
												}
											}
										}
										contentsList.push(list[i]);
									}
									switch(order) {
										case 'created':
											that.contentsList_created = contentsList;
											localStorage.setItem('contentsList_created', JSON.stringify(contentsList));
											break;
										case 'replyTime':
											that.contentsList_replyTime = contentsList;
											localStorage.setItem('contentsList_replyTime', JSON.stringify(contentsList));
											break;
										case 'likes':
											that.contentsList_likes = contentsList;
											localStorage.setItem('contentsList_likes', JSON.stringify(contentsList));
											break;
										case 'views':
											that.contentsList_views = contentsList;
											localStorage.setItem('contentsList_views', JSON.stringify(contentsList));
											break;
										case 'commentsNum':
											that.contentsList_commentsNum = contentsList;
											localStorage.setItem('contentsList_commentsNum', JSON.stringify(contentsList));
											break;
									}
								}
							}
							// 使用计数器管理状态
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.submitStatus1 = false;
								that.isLoad = 0;
								that.moreText = that.$t('common.loadmoretxt');
								if (!isPage) {
									that.dataLoad = true;
								}
							}
						},
						fail: function(res) {
							// 失败时也要更新计数器
							completedRequests++;
							if (completedRequests === totalRequests) {
								that.submitStatus1 = false;
								that.moreText = that.$t('common.loadmoretxt');
								that.isLoad = 0;
							}
						}
					})
				});
			},
			userStatus() {
				var that = this;
				that.$Net.request({
					url: that.$API.userStatus(),
					data: {
						"token": that.token
					},
					header: {
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					method: "get",
					dataType: 'json',
					success: function(res) {
						if (res.data.code == 0) {
							localStorage.removeItem('userinfo');
							localStorage.removeItem('token');
							that.token = "";
							that.userinfo = null;
						} else if (res.data.code == 1) {
							that.avatarurl = res.data.data.avatar;
							if (localStorage.getItem('identifyCompany')) {
								that.identifyCompany = localStorage.getItem('identifyCompany');
							} else {
								var myuid = res.data.data.uid
								that.getRz(myuid)
							}
							var userInfo = JSON.parse(localStorage.getItem('userinfo'));
							if (res.data.data.isvip) {
								userInfo.isvip = res.data.data.isvip;
							}
							if (res.data.data.vip) {
								userInfo.vip = res.data.data.vip;
							}
							if (res.data.data.avatar) {
								userInfo.avatar = res.data.data.avatar;
							}
							localStorage.setItem('userinfo', JSON.stringify(userInfo));
						}
					},
					fail: function(res) {
						uni.showToast({
							title: that.$t('common.networkfail'),
							icon: 'none'
						})
					}
				})
			},
			unreadNum() {
				var that = this;
				if (localStorage.getItem('noticeSum')) {
					that.noticeSum = Number(localStorage.getItem('noticeSum'));
				}
			},
			toSearch() {
				var that = this;
				if (that.noLogin) {
					uni.navigateTo({
						url: '/pages/user/login'
					});
					return false;
				}
				uni.navigateTo({
					url: '/pages/contents/search'
				});
			},
			toInfo(data,type) {
				if (type == 'wz') {
					uni.navigateTo({
						url: '/pages/contents/info?cid=' + data.cid + "&title=" + data.title
					});
				}
				if (type == 'tz') {
					uni.navigateTo({
						url: '/pages/forum/info?id=' + data.id
					});
				}
			},
			subText(text, num) {
				if (text.length < null) {
					return text.substring(0, num) + "……"
				} else {
					return text;
				}
			},
			toTopContents(title, id) {
				var type = "meta";
				uni.navigateTo({
					url: '/pages/contents/contentlist?title=' + title + "&type=top&id=" + id
				});
			},
			goUserInfo() {
				if (!localStorage.getItem('token') || localStorage.getItem('token') == "") {
					uni.navigateTo({
						url: '/pages/user/login'
					});
					return false;
				}
				uni.$emit('goUser', 0);
			},
			goCategory() {
				var that = this;
				if (that.homeMode == 1) {
					uni.navigateTo({
						url: '/pages/contents/allcategory'
					});
				}
				if (that.homeMode == 2) {
					uni.navigateTo({
						url: '/pages/forum/section'
					});
				}
				if (that.homeMode == 3) {
					uni.$emit('goFind', 1);
				}

			},
			toLink(text, lgof) {
				var that = this;
				if (lgof == "true") {
					if (!localStorage.getItem('token') || localStorage.getItem('token') == "") {
						uni.showToast({
							title: that.$t('common.plslogin'),
							icon: 'none'
						})
						return false;
					}
				}
				uni.navigateTo({
					url: text
				});
			},
			scanLogin(text) {
				var that = this;
				var token;
				if (!localStorage.getItem('token')) {
					uni.showToast({
						title: that.$t('common.plslogin'),
						icon: 'none'
					})
					return false;
				}
				uni.navigateTo({
					url: '/pages/user/scan?text=' + text
				});
			},

			goLogin() {
				uni.navigateTo({
					url: '/pages/user/login'
				});
			},
			openAuth() {
				this.$refs['authpup'].open();
			},
			formatSize(size) {
				if (!size) {
					return $t('global.unknownsize');
				}

				if (size >= 1024 * 1024) {
					return (size / (1024 * 1024)).toFixed(1) + 'Gb';
				} else if (size >= 1024) {
					return (size / 1024).toFixed(1) + 'Mb';
				} else {
					return size + 'Kb';
				}
			},
			// 显示排序选择器
			showOrderPicker() {
				this.showOrder = true;
			},

			// 确认排序方式
			confirmOrder(e) {
				const selectedOption = this.orderOptions[e[0]];
				if (selectedOption) {
					this.selectedOrder = selectedOption.value;
					this.orderText = selectedOption.text;
					this.showOrder = false;

					// 重新获取数据
					this.page = 1;
					this.getAppList(false);
				}
			},
			// 取消选择
			cancelOrder() {
				this.showOrder = false;
			},
			// 显示系统筛选
			showSystemFilter() {
				this.showSystem = true;
			},
			// 选择系统
			selectSystem(value) {
				this.selectedSystem = value;
			},
			// 重置系统筛选
			resetSystem() {
				this.selectedSystem = '';
				this.systemText = this.$t('global.system');
				this.showSystem = false;
				this.getAppList();
			},

			// 确认系统筛选
			confirmSystem() {
				const option = this.systemOptions.find(item => item.value === this.selectedSystem);
				this.systemText = option ? option.label : this.$t('global.system');
				this.showSystem = false;

				// 重新获取数据
				this.page = 1;
				this.getAppList(false);
			},

			// 显示类型筛选
			showTypeFilter() {
				this.showType = true;
			},

			// 选择类型
			selectType(value) {
				this.selectedType = value;
			},

			// 重置类型筛选
			resetType() {
				this.selectedType = '';
				this.typeText = this.$t('global.type');
				this.showType = false;
				this.getAppList(false);
			},

			// 确认类型筛选
			confirmType() {
				const option = this.typeOptions.find(item => item.value === this.selectedType);
				this.typeText = option ? option.label : this.$t('global.type');
				this.showType = false;

				// 重新获取数据
				this.page = 1;
				this.getAppList(false);
			},
			toAppInfo(id) {
				uni.navigateTo({
					url: '/pages/plugins/sy_appbox/info?id=' + id
				});
			},
			getAppBoxInfo() {
				var that = this;
				uni.request({
					url: that.$API.PluginLoad('sy_appbox'),
					data: {
						"action": "getConfig",
					},
					method: 'GET',
					dataType: "json",
					success(res) {
						if (res.data.code == 200) {
							that.appTopOf = res.data.data.appTopOf;
							that.homeModApp = res.data.data.homeModApp;
						} else {
							console.log(res.data);
						}
						that.getSet();
					},
					fail(error) {
						uni.showToast({
							title: that.$t('common.networkfail'),
							icon: 'none'
						})
						that.getSet();
					}
				})

			},
			// 轮播图切换事件
			swiperChange(e) {
				this.current = e.detail.current;
			},
			toMoreArticles() {
				uni.switchTab({
					url: '/pages/tabPage/contents'
				});
			},
			goInfo(id) {
				uni.navigateTo({
					url: '/pages/forum/info?id=' + id
				});
			},
			toMoreApps() {
				uni.navigateTo({
					url: '/pages/plugins/sy_appbox/home'
				});
			},
			// 检查是否需要刷新数据
			checkAndRefreshData() {
				var that = this;
				// 检查动态发布刷新标记
				var needRefreshSpace = localStorage.getItem('needRefreshSpace');
				if (needRefreshSpace === 'true') {
					// 清除标记
					localStorage.removeItem('needRefreshSpace');
					// 刷新动态相关数据
					if (that.spaceof == 1) {
						that.getSpaceList();
					}
					if (that.tzof == 1) {
						that.getPostList(false, false);
					}
				}
				
				// 检查首页刷新标记
				var needRefreshHome = localStorage.getItem('needRefreshHome');
				if (needRefreshHome === 'true') {
					// 清除标记
					localStorage.removeItem('needRefreshHome');
					// 刷新首页数据
					that.loading();
				}
			}
		},
		// #ifdef H5 || MP
		components: {
			waves
		},
		// #endif
		components: {
			articleCardHorizontal,
			postCardHorizontal,
			appItemGrid,
			appItemHorizontal,
			shopCardHorizontal,
			shopCardList,
			spaceItem
		}
	}
</script>
<style lang="scss" scoped>
	@import "@/static/styles/home.scss";

	body {
		background-color: #f6f6f6;
	}
	
	/* 夜间模式样式 */
	.dark {
		background-color: #121212 !important;
		color: #f1f1f1 !important;
		
		.header, .cu-bar, .bg-white, .data-box, .app-grid-container, .scroll-articles {
			background-color: #1c1c1c !important;
			color: #f1f1f1 !important;
		}
		
		.section-name, .app-name, .data-box-title, .more {
			color: #f1f1f1 !important;
		}
		
		.home-search {
			background-color: #2c2c2c !important;
			color: #aaaaaa !important;
		}
		
		.vertical-articles {
			background-color: #121212 !important;
		}
		
		.app-icon, .icon5__item--icon {
			box-shadow: 0 0 8rpx rgba(255, 255, 255, 0.1) !important;
		}
		
		.section-tag {
			background-color: #333333 !important;
			color: #dddddd !important;
		}
	}
		
	.data-box-title{
		font-size: 36rpx !important;
		font-weight: bold;
	}
	.more{
		font-size: 30rpx !important;
		font-weight: bold;
		color: #333;
	}
	.home-search{
		line-height: 80rpx;
		height: 80rpx;
		font-size: 32rpx;
		color: #9d9d9d;
		border-radius: 40rpx !important;
		font-weight: bold;
	}
	/* 自定义导航栏内容 end */
	.image-circle {
		// padding: 95rpx;
		width: 120rpx;
		height: 120rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
		box-shadow: 0rpx 4rpx 20rpx #e7e7e7;
		border-radius: 40rpx;
	}

	.data-box-2 {
		padding: 0;
		margin: 20upx 20upx;
		border-radius: 20upx;
		box-shadow: 0 0 50upx 0 rgba(0, 0, 0, .04);
	}

	.data-box-2-banner {
		padding: 0;
		margin: 20upx 0;
		border-radius: 20upx;
		box-shadow: 0 0 50upx 0 rgba(0, 0, 0, .04);
	}

	.data-box-2 .cu-bar {
		border-radius: 20upx;
	}

	.image-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 40rpx;
	}

	/* 间隔线 start*/
	.tn-strip-bottom {
		width: 100%;
		border-bottom: 1rpx solid rgba(241, 241, 241, 0.8);
	}

	/* 间隔线 end*/
	.header-icon {
		font-size: 36rpx;
	}

	.bq-box {
		padding: 10rpx 40rpx;
		background-color: #c9edff;
		color: #3ca9c9;
		margin: 30rpx 10rpx 0rpx 10rpx;
	}

	.down-button {
		border-radius: 40rpx;
		background-color: #3cc9a4;
		padding: 10rpx 20rpx;
		color: white;
		font-size: 24rpx;
	}

	.icon5__item--icon {
		width: 62rpx;
		height: 62rpx;
		margin-bottom: 10rpx;
	}
	.icon5__item--icon-2 {
		width: 90rpx;
		height: 90rpx;
		margin-bottom: 10rpx;
	}
	.app-box {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;
	}

	.app-box-body {
		flex: 1;
		display: flex;
		margin-right: 20rpx;
		min-width: 0; // 防止flex子元素溢出
		align-items: center;
	}

	.app-box-logo {
		width: 110rpx;
		height: 110rpx;
		flex-shrink: 0; // 防止图片缩小
	}

	.app-box-content {
		flex: 1;
		margin-left: 20rpx;
		min-width: 0; // 防止flex子元素溢出
	}

	.app-box-title {
		font-size: 30rpx;
		font-weight: bold;
		margin-bottom: 8rpx;
		width: 400rpx; // 限制标题宽度
	}

	.app-box-down {
		background-color: #3cc9a4;
		color: #fff;
		padding: 10rpx 30rpx;
		border-radius: 100rpx;
	}

	.app-box-tag {

		color: #fff;
		padding: 6rpx 6rpx;
		border-radius: 10rpx;
		font-size: 24rpx;
		margin-right: 10rpx;
	}

	.text-cut {
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
	}

	.app-box-info {
		font-size: 26rpx;
		color: #666;
		margin-bottom: 8rpx;

		text {
			margin-right: 10rpx;
		}
	}

	.app-box-down {
		background-color: #3cc9a4;
		color: #fff;
		padding: 10rpx 30rpx;
		border-radius: 100rpx;
		white-space: nowrap; // 防止文字换行
	}

	.app-tag-1 {
		background-color: deepskyblue;
	}

	.app-tag-2 {
		background-color: #57d1b1;
	}

	.app-box-tags {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		font-size: 28rpx;
	}

	.app-tag {
		padding: 4rpx 12rpx;
		border-radius: 8rpx;
		color: #ffffff;
		margin-right: 12rpx;
		font-size: 24rpx;
	}

	.app-category-tag {
		padding: 4rpx 12rpx;
		border-radius: 8rpx;
		background-color: #f5f5f5;
		color: #666666;
		margin-right: 12rpx;
		font-size: 24rpx;
	}

	/* 筛选栏样式 */
	.filter-bar {
		display: flex;
		padding: 20rpx;
		border-bottom: 1px solid #f5f5f5;
	}

	.filter-item {
		flex: 1;
		text-align: center;
		font-size: 28rpx;
		color: #333;
	}

	.filter-item .cuIcon-unfold {
		margin-left: 4rpx;
		font-size: 24rpx;
		color: #999;
	}

	/* 筛选弹窗样式 */
	.filter-popup {
		background: #fff;
		padding: 30rpx;
		border-radius: 20rpx 20rpx 0 0;
	}

	.filter-title {
		font-size: 32rpx;
		font-weight: bold;
		margin-bottom: 30rpx;
	}

	.filter-options {
		display: flex;
		flex-wrap: wrap;
	}


	.filter-option {
		width: 160rpx;
		height: 60rpx;
		line-height: 60rpx;
		text-align: center;
		border: 1px solid #eee;
		border-radius: 30rpx;
		margin: 0 20rpx 20rpx 0;
		font-size: 28rpx;
	}

	.filter-option.active {
		background: #3cc9a4;
		color: #fff;
		border-color: #3cc9a4;
	}

	.filter-buttons {
		display: flex;
		margin-top: 40rpx;
	}

	.btn-reset,
	.btn-confirm {
		flex: 1;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		border-radius: 40rpx;
		margin: 0 20rpx;
		font-size: 30rpx;
	}

	.btn-reset {
		background: #f5f5f5;
		color: #666;
	}

	.btn-confirm {
		background: #3cc9a4;
		color: #fff;
	}

	.text-title-1 {
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
	}


	/* 添加加载动画相关样式 */
	.loading-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 40rpx 0;

		.loading-text {
			font-size: 26rpx;
			color: #909399;
			margin-top: 20rpx;
		}
	}

	.custom-swiper {
		height: 360rpx;
		margin: 20rpx;
		border-radius: 32rpx;
		overflow: hidden;

		.swiper-item {
			position: relative;
			width: 100%;
			height: 100%;
			border-radius: 32rpx;
			overflow: hidden;

			// 背景图层
			.swiper-bg {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				overflow: hidden;
				border-radius: 32rpx;

				// 背景图片
				.bg-image {
					position: absolute;
					top: -20%;
					left: -20%;
					width: 140%;
					height: 140%;
					filter: blur(5px);
					transform: scale(1.5);
					opacity: 0.8;
				}

				// 渐变遮罩
				.dark-overlay {
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.6) 100%);
					border-radius: 32rpx;
					backdrop-filter: blur(5px);
				}
			}

			// 内容层
			.swiper-content {
				position: absolute;
				bottom: 0;
				left: 0;
				width: 100%;
				padding: 40rpx;
				z-index: 1;

				.app-info {
					display: flex;
					align-items: center;

					.app-icon {
						width: 120rpx;
						height: 120rpx;
						border-radius: 24rpx;
						box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.3);
					}

					.app-text {
						margin-left: 24rpx;

						.app-name {
							display: block;
							font-size: 32rpx;
							font-weight: bold;
							color: #ffffff;
							margin-bottom: 8rpx;
							text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.4);
						}

						.app-rating {
							display: flex;
							align-items: center;
							margin-bottom: 8rpx;

							.score {
								color: #ffffff;
								font-size: 28rpx;
								margin-right: 8rpx;
								text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
							}

							.star {
								color: rgba(255, 255, 255, 0.5);
								font-size: 28rpx;

								&.active {
									color: #ffd700;
									text-shadow: 0 2rpx 8rpx rgba(255, 215, 0, 0.4);
								}
							}
						}

						.app-desc {
							display: block;
							font-size: 24rpx;
							color: rgba(255, 255, 255, 0.8);
							width: 400rpx;
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							text-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.2);
						}
					}
				}
			}
		}
	}

	// 指示点样式
	::v-deep .uni-swiper-dots {
		bottom: 24rpx;

		.uni-swiper-dot {
			width: 6rpx;
			height: 6rpx;
			border-radius: 3rpx;
			margin: 0 4rpx;
			background: rgba(255, 255, 255, 0.4);
			transition: all 0.3s ease;

			&.uni-swiper-dot-active {
				width: 18rpx;
				background: #ffffff;
				box-shadow: 0 0 4rpx rgba(255, 255, 255, 0.4);
			}
		}
		
	}
	.bg-h{
		background-color: #f3f3f3 !important;
	}

	.icon-grid-container {
	  width: 100%;
	  display: flex;
	  justify-content: center;
	  padding: 10rpx 0;
	}

	.icon-grid {
	  display: flex;
	  flex-wrap: wrap;
	  justify-content: flex-start;
	  width: 100%;
	  max-width: 750rpx;
	}

	.icon-item {
	  width: calc(100% / 5);
	  box-sizing: border-box;
	  padding: 10rpx;
	}

	/* 首页精选圈子样式优化 */
	.home-recommend-container {
		display: flex;
		flex-wrap: wrap;
		padding: 0 20upx;
	}

	.home-recommend-item {
		width: 25%;
		padding: 0 10upx;
		margin-bottom: 30upx;
		box-sizing: border-box;
	}

	.home-recommend-item-content {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.home-recommend-avatar-container {
		width: 120upx;
		height: 120upx;
		margin-bottom: 15upx;
		position: relative;
	}

	.home-recommend-avatar {
		width: 100%;
		height: 100%;
		border-radius: 40upx;
		background-size: cover;
		background-position: center;
		background-repeat: no-repeat;
		box-shadow: 0 4upx 20upx rgba(231, 231, 231, 0.6);
	}

	.home-recommend-avatar-placeholder {
		width: 100%;
		height: 100%;
		border-radius: 40upx;
		background: linear-gradient(135deg, #3cc9a4, #2ba085);
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 4upx 20upx rgba(60, 201, 164, 0.3);
	}

	.home-placeholder-text {
		color: #ffffff;
		font-size: 40upx;
		font-weight: bold;
	}

	.home-recommend-name {
		font-size: 28upx;
		color: #333;
		margin-bottom: 8upx;
		width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-weight: bold;
	}

	.home-recommend-count {
		font-size: 22upx;
		color: #999;
	}

	/* 夜间模式下的精选圈子样式 */
	.dark .home-recommend-name {
		color: #f1f1f1 !important;
	}

	.dark .home-recommend-count {
		color: #aaaaaa !important;
	}
	
</style>

<style>
.horizontal-articles {
	margin: 20rpx 0;
}

.scroll-articles-padding{
	padding: 10rpx 0 10rpx 20rpx;
}

.section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 30rpx;
	font-weight: bold;
	margin-bottom: 20rpx;
}

.section-title .more {
	font-size: 24rpx;
	color: #666;
	font-weight: normal;
}

.scroll-articles {
	width: 100%;
	white-space: nowrap;
}

.scroll-articles-content {
	display: flex;
	flex-direction: row;
	white-space: nowrap;
}

.article-card-item {
	display: inline-block;
	white-space: normal;
}

.scroll-articles::-webkit-scrollbar {
	display: none;
}

/* 纵向文章卡片样式 */
.vertical-articles {
	margin: 20rpx 0;
}

.vertical-articles-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	padding: 10rpx 20rpx;
}

.article-grid-item {
	width: 48%;
	margin-bottom: 20rpx;
}

/* 修改大尺寸卡片在网格布局下的宽度 */
.article-grid-item .article-card.card-size-large,
.article-grid-item .post-card.card-size-large {
	width: 100% !important;
	margin-right: 0;
}

.article-grid-item .article-card.card-size-large .article-cover,
.article-grid-item .post-card.card-size-large .post-cover {
	height: 240rpx;
}

.article-grid-item .article-title.title-size-large,
.article-grid-item .post-title.title-size-large {
	height: auto;
	min-height: 90rpx;
	-webkit-line-clamp: 3;
	font-size: 30rpx;
}

/* 夜间模式全局样式 */
	.dark {
		background-color: #1c1c1c;
	}
	
	/* 应用卡片夜间样式 */
	.dark .article-card, .dark .post-card{
		background-color: #2c2c2c !important;
		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.5) !important;
	}
	/* #ifndef MP-WEIXIN */
	.dark .article-title, .dark .post-title, .dark .user-name, .dark .tn-text-ellipsis {
		color: #f1f1f1 !important;
	}
	/* #endif */
	
	.dark .info-item, .time-text {
		color: #aaaaaa !important;
	}
	
	.dark .down-button {
		background-color: #454545 !important;
	}
	
	/* 夜间模式下的section-tag样式覆盖 */
	.dark .section-tag {
		background-color: #3b3b3b !important;
		color: #dddddd !important;
	}

.shop-list-single {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 20rpx;
}
</style>